package javaDesignModel.singletonPattern;

/**
 * Created by admin on 2017/3/14.
 */
public class TaskManager {
    private static TaskManager tm = null;

    public void display() {
        System.out.println("显示任务进程");
    }

    private TaskManager() {
        System.out.println("初始化任务进程");
    }

    public static TaskManager getInstance() {
        if (null == tm) {
            tm = new TaskManager();
        }
        return tm;
    }
}
